package com.remenote.remenoteback.util;

/**
 * @BelongsProject: remenote-back
 * @BelongsPackage: com.remenote.remenoteback.util
 * @Author: 23392
 * @CreateTime: 2024-03-18  14:36
 * @Description: TODO
 * @Version: 1.0
 */
public class ThreadLocalUtil {
    private static final ThreadLocal<String> USER_NAME = new ThreadLocal<>();

    public static void setUserName(String userName) {
        USER_NAME.set(userName);
    }

    public static String getUserName() {
        return USER_NAME.get();
    }

    public static void remove() {
        USER_NAME.remove();
    }
}
